NotificationChannelCompat

A representation of settings that apply to a collection of similarly themed notifications. Setters return this to allow chaining. This class doesn't do anything on older SDKs which don't support Notification Channels.

Types

Link copied to clipboard
open class Builder
Builder class for NotificationChannelCompat objects.

Properties

Link copied to clipboard
val DEFAULT_CHANNEL_ID: String = "miscellaneous"
The id of the default channel for an app.

Functions

Link copied to clipboard
open fun canBubble(): Boolean
Returns whether notifications posted to this channel are allowed to display outside of the notification shade, in a floating window on top of other apps.
Link copied to clipboard
open fun canBypassDnd(): Boolean
Whether or not notifications posted to this channel can bypass the Do Not Disturb INTERRUPTION_FILTER_PRIORITY mode.
Link copied to clipboard
open fun canShowBadge(): Boolean
Returns whether notifications posted to this channel can appear as badges in a Launcher application.
Link copied to clipboard
Returns the audio attributes for sound played by notifications posted to this channel.
Link copied to clipboard
Returns the id of the conversation backing this channel, if it's associated with a conversation.
Link copied to clipboard
Returns the user visible description of this channel.
Link copied to clipboard
Returns what group this channel belongs to.
Link copied to clipboard
open fun getId(): String
Returns the id of this channel.
Link copied to clipboard
open fun getImportance(): Int
Returns the user specified importance e.g.
Link copied to clipboard
open fun getLightColor(): Int
Returns the notification light color for notifications posted to this channel.
Link copied to clipboard
Returns whether or not notifications posted to this channel are shown on the lockscreen in full or redacted form.
Link copied to clipboard
Returns the user visible name of this channel.
Link copied to clipboard
Returns the id of the parent notification channel to this channel, if it's a conversation related channel.
Link copied to clipboard
open fun getSound(): Uri
Returns the notification sound for this channel.
Link copied to clipboard
Returns the vibration pattern for notifications posted to this channel.
Link copied to clipboard
Whether or not notifications in this conversation are considered important.
Link copied to clipboard
Returns whether notifications posted to this channel trigger notification lights.
Link copied to clipboard
Returns whether notifications posted to this channel always vibrate.
Link copied to clipboard
Creates a Builder instance with all the writeable property values of this instance.